/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mxgraph.examples.swing.editor;

import java.awt.HeadlessException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import javax.swing.JTextField;

import com.mxgraph.examples.swing.editor.EditorActions.DeleteAction;
import com.mxgraph.view.mxGraph;
import javax.swing.JOptionPane;

/**
 *
 * @author User
 */
public class Deviceform extends javax.swing.JFrame {

    public Deviceform() throws HeadlessException {
        super();
    }
    static final String DB_URL = "jdbc:mysql://localhost/pf";
    mxGraph graph;
    double dx, dy;
    //public  DoubleProperty opacityProperty;
    String ip, name,contact,description,deviceLocation;

    /**
     * Creates new form NewJFrame
     */
    public Deviceform(String contact,String deviceLocation,String description,String ip, String name, mxGraph graph, double dx, double dy) {
        this.ip = ip;
        this.contact = contact;
        this.deviceLocation = deviceLocation;
        this.description = description;
        this.name = name;
        this.dx = dx;
        this.dy = dy;
        this.graph = graph;
        initComponents();



    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jLabelSnmpauthprotocolWrite = new javax.swing.JLabel();
        jLabelNormalVlan = new javax.swing.JLabel();
        jLabelIsolationVlan = new javax.swing.JLabel();
        jLabelGuestVLAN = new javax.swing.JLabel();
        jLabelSnmpprivprotWrite = new javax.swing.JLabel();
        jLabelType = new javax.swing.JLabel();
        jLabelIp = new javax.swing.JLabel();
        jLabelSnmpCTrap = new javax.swing.JLabel();
        jLabelMacDetectionVLAN = new javax.swing.JLabel();
        jLabelSnmpUserNameRead = new javax.swing.JLabel();
        jLabelUplink = new javax.swing.JLabel();
        jLabelSnmpauthpassWrite = new javax.swing.JLabel();
        jLabelVlan = new javax.swing.JLabel();
        jLabelSnmpAuthPasswordTrap = new javax.swing.JLabel();
        jLabelSnmpversion = new javax.swing.JLabel();
        jLabelSnmpCR = new javax.swing.JLabel();
        jLabelSnmpprivpassRead = new javax.swing.JLabel();
        jLabelRegistrationVlan = new javax.swing.JLabel();
        jLabelSnmpCW = new javax.swing.JLabel();
        jLabelSnmpprivatepassWrite = new javax.swing.JLabel();
        jLabelSnmpAuthProtocolTrap = new javax.swing.JLabel();
        jLabelSnmpEngineID = new javax.swing.JLabel();
        jLabelSnmpauthprivpasstrap = new javax.swing.JLabel();
        jLabelMode = new javax.swing.JLabel();
        jLabelSnmpauthproRead = new javax.swing.JLabel();
        jLabelControllerIp = new javax.swing.JLabel();
        jLabelSnmpuserWrite = new javax.swing.JLabel();
        jLabelSnmpprivprotRead = new javax.swing.JLabel();
        jLabelSnmpversionTrap1 = new javax.swing.JLabel();
        jLabelSnmpUsernameTrap = new javax.swing.JLabel();
        jLabelSNMPPrivProtocolTraP = new javax.swing.JLabel();
        jTextFieldIP = new javax.swing.JTextField();
        jTextFieldTYPE = new javax.swing.JTextField();
        jTextFieldMode = new javax.swing.JTextField();
        jTextFieldVLan = new javax.swing.JTextField();
        jTextFieldUpLink = new javax.swing.JTextField();
        jTextFieldControllerIp = new javax.swing.JTextField();
        jTextFieldRegistrationVlan = new javax.swing.JTextField();
        jTextFieldNormalVLan = new javax.swing.JTextField();
        jTextFieldPassTRAP = new javax.swing.JTextField();
        jTextFieldIsolationVlan = new javax.swing.JTextField();
        jTextFieldUserTrap = new javax.swing.JTextField();
        jTextFieldSnmpauthProTRAP = new javax.swing.JTextField();
        jTextFieldProtoTRAP = new javax.swing.JTextField();
        jTextFieldPriPassTrap = new javax.swing.JTextField();
        jTextFieldEngineId = new javax.swing.JTextField();
        jTextFieldUserREAD = new javax.swing.JTextField();
        jTextFieldAuthPREAD = new javax.swing.JTextField();
        jTextFieldPriProtoREAD = new javax.swing.JTextField();
        jTextFieldPrivatePREAD = new javax.swing.JTextField();
        jTextFieldUserWrite = new javax.swing.JTextField();
        jTextFieldAuthoProtoWrite = new javax.swing.JTextField();
        jTextFieldAuthPassWrite = new javax.swing.JTextField();
        jTextFieldPrivateProtoWrite = new javax.swing.JTextField();
        jTextFieldPriPassWrite = new javax.swing.JTextField();
        jTextFieldVersionTRAP = new javax.swing.JTextField();
        jTextFieldSNMPVersion = new javax.swing.JTextField();
        jTextFieldCommunityTRAP = new javax.swing.JTextField();
        jTextFieldComREAD = new javax.swing.JTextField();
        jTextFieldComunityWRITE = new javax.swing.JTextField();
        jTextFieldGuestVLAN = new javax.swing.JTextField();
        jTextFieldMacVLAN = new javax.swing.JTextField();
        jButtonSubmit = new javax.swing.JButton();
        jButtonClear = new javax.swing.JButton();
        jButtonEXIT = new javax.swing.JButton();


        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("DEVICE PROPERTY");
        setResizable(false);
        jLabelSnmpauthprotocolWrite.setText("SNMP AUTHORIZED PROTOCOL WRITE");

        jLabelNormalVlan.setText("NORMAL VLAN");

        jLabelIsolationVlan.setText("ISOLATION VLAN");

        jLabelGuestVLAN.setText("GUEST VLAN");

        jLabelSnmpprivprotWrite.setText("SNMP PRIVATE PROTOCOL WRITE");

        jLabelType.setText("TYPE");

        jLabelIp.setText("IP");

        jLabelSnmpCTrap.setText("SNMP COMMUNITY TRAP");

        jLabelMacDetectionVLAN.setText("MAC DETECTION VLAN");

        jLabelSnmpUserNameRead.setText("SNMP USER NAME READ");

        jLabelUplink.setText("UPLINK");

        jLabelSnmpauthpassWrite.setText("SNMP AUTHORIZED PASSWORD WRITE");

        jLabelVlan.setText("VLAN");

        jLabelSnmpAuthPasswordTrap.setText("SNMP AUTHORISED  PASSWORD TRAP");

        jLabelSnmpversion.setText("SNMP VERSION");

        jLabelSnmpCR.setText("SNMP COMMUNITY READ*");

        jLabelSnmpprivpassRead.setText("SNMP PRIVATE PASS READ");

        jLabelRegistrationVlan.setText("REGISTRATION VLAN");

        jLabelSnmpCW.setText("SNMP COMMUNITY WRITE");

        jLabelSnmpprivatepassWrite.setText("SNMP PRIVATE PASSWORD WRITE");

        jLabelSnmpAuthProtocolTrap.setText("SNMP AUTHORIZED PROTOCOL TRAP");

        jLabelSnmpEngineID.setText("SNMP ENGINE ID");

        jLabelSnmpauthprivpasstrap.setText("SNMP AUTHORIZED PRIVATE PASSWORD TRAP");

        jLabelMode.setText("MODE");

        jLabelSnmpauthproRead.setText("SNMP AUTHORIZED PROTOCOL READ");

        jLabelControllerIp.setText("CONTROLLER IP");

        jLabelSnmpuserWrite.setText("SNMP USERNAME WRITE");

        jLabelSnmpprivprotRead.setText("SNMP PRIVATE PROTOCOL READ");

        jLabelSnmpversionTrap1.setText("SNMP VERSION TRAP");

        jLabelSnmpUsernameTrap.setText("SNMP AUTHORIZED  USERNAME TRAP");

        jLabelSNMPPrivProtocolTraP.setText("SNMP AUTHORIZED PRIVATE PROTOCOL TRAP");


        jTextFieldIP.setEnabled(false);
        jTextFieldIP.setText(ip);

        jTextFieldTYPE.setEnabled(false);
        jTextFieldTYPE.setText("Switch");

        jTextFieldIP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldIPActionPerformed(evt);
            }
        });

        //jTextFieldTYPE.setText("SWITCH");
        jTextFieldTYPE.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR));
        jTextFieldTYPE.setEnabled(false);

        jTextFieldMode.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldModeActionPerformed(evt);
            }
        });

        jTextFieldUpLink.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldUpLinkActionPerformed(evt);
            }
        });

        jTextFieldSnmpauthProTRAP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldSnmpauthProTRAPActionPerformed(evt);
            }
        });

        jTextFieldComunityWRITE.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTextFieldComunityWRITEActionPerformed(evt);
            }
        });


        //System.out.println("123456789");
        jButtonSubmit.setText("SUBMIT");
        jButtonSubmit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {

                if (jTextFieldIP.getText().length() == 0) {
                    JOptionPane.showMessageDialog(null, "ENTER SNMP COMMUNITY READ");
                } else {
                    try {


                        String ip = jTextFieldIP.getText();
                        String type = jTextFieldTYPE.getText();
                        String mode = jTextFieldMode.getText();
                        String uplink = jTextFieldUpLink.getText();
                        String vlan = jTextFieldVLan.getText();
                        String normalvlan = jTextFieldNormalVLan.getText();
                        String rvlan = jTextFieldRegistrationVlan.getText();
                        String iso = jTextFieldIsolationVlan.getText();
                        String cip = jTextFieldControllerIp.getText();
                        String utrap = jTextFieldUserTrap.getText();
                        String snmpatrap = jTextFieldSnmpauthProTRAP.getText();
                        String ptrap = jTextFieldPassTRAP.getText();
                        String snmpptrap = jTextFieldProtoTRAP.getText();
                        String pptrap = jTextFieldPriPassTrap.getText();
                        String eip = jTextFieldEngineId.getText();
                        String uread = jTextFieldUserREAD.getText();
                        String apread = jTextFieldAuthPREAD.getText();
                        //String cip=jTextFielda.getText();SNMPAuthPasswordRead`,
                        String ppread = jTextFieldPriProtoREAD.getText();
                        String pread = jTextFieldPrivatePREAD.getText();
                        String uw = jTextFieldUserWrite.getText();
                        String aw = jTextFieldAuthoProtoWrite.getText();

                        String authpw = jTextFieldAuthPassWrite.getText();

                        String pprow = jTextFieldPrivateProtoWrite.getText();

                        String ppasswrite = jTextFieldPriPassWrite.getText();
                        String vt = jTextFieldVersionTRAP.getText();
                        String sv = jTextFieldSNMPVersion.getText();
                        String ct = jTextFieldCommunityTRAP.getText();
                        String cr = jTextFieldComREAD.getText();
                        String cw = jTextFieldComunityWRITE.getText();
                        String gv = jTextFieldGuestVLAN.getText();
                        String mv = jTextFieldMacVLAN.getText();
                        String sqlfind;
                        sqlfind = "SHOW TABLES LIKE 'packetfence_manuallyAddswitch_info'";
                        Statement stmt = DatabaseConnectivity.generateStatement();
                        int norow = stmt.executeUpdate(sqlfind);
                        stmt.close();
                        //dispose();


//            	 stmt.executeUpdate(sqlfind);

                        if (norow == 0) {
                            //norow=0 represents the table is not available in databse otherwise available if norow=-1

                            System.out.println(norow + "NOROW");
                            // packetfencenew1_switch_info is a new database

                            String sqlcreate;
                            sqlcreate = "CREATE TABLE packetfence_manuallyAddswitch_info(IP VARCHAR(32) NOT NULL ,NAME VARCHAR(50),CONTACT VARCHAR(100)"
                                    + ",LOCATION VARCHAR (100),DESCRIPTION VARCHAR (500),TYPE VARCHAR (20) , MODE VARCHAR (20) "
                                    + ",UPLINK VARCHAR (20) ,VLANS  VARCHAR (20) , "
                                    + "NORMALVLAN VARCHAR (20) ,REGISTRATIONVLAN VARCHAR (20) ,ISOLATIONVLAN VARCHAR (20) ,"
                                    + "CONTROLLERIP VARCHAR (20) ,SNMPUSERNAMETRAP VARCHAR (20) ,"
                                    + "SNMPAUTHPROTOCOLTRAP VARCHAR (20) ,SNMPAUTHPASSWORDTRAP VARCHAR (20) ,"
                                    + "SNMPPRIVPROTOCOLTRAP VARCHAR (20) ,SNMPPRIVPASSWORDTRAP VARCHAR (20) ,"
                                    + "SNMPENGINEID VARCHAR (20) ,SNMPUSERNAMEREAD VARCHAR (20) ,"
                                    + "SNMPAUTHPROTOCOLREAD VARCHAR (20) ,SNMPPRIVPROTOCOLREAD VARCHAR (20) ,"
                                    + "SNMPPRIVPASSREAD VARCHAR (20) ,SNMPUserNameWrite VARCHAR (20) ,"
                                    + "SNMPAuthProtocolWrite VARCHAR (20) ,SNMPAuthPasswordWrite VARCHAR (20) ,"
                                    + "SNMPPrivProtocolWrite VARCHAR (20) ,SNMPPrivPasswordWrite VARCHAR (20) ,"
                                    + "SNMPVersionTrap VARCHAR (20) ,SNMPVersion VARCHAR (20) ,"
                                    + "SNMPCommunityTrap VARCHAR (20) ,SNMPCommunityRead VARCHAR (20) ,"
                                    + "SNMPCommunityWrite VARCHAR (20) ,guestVlan VARCHAR (20) ,"
                                    + "macDetectionVlan VARCHAR (20) ,PRIMARY KEY (IP))";

                            String sql;
                            sql = "INSERT INTO `packetfence_manuallyAddswitch_info`(`ip`,`name`,`contact`,`location`,`description`, `type`, `mode`, "
                                    + "`uplink`, `vlans`, `normalVlan`, `registrationVlan`, `isolationVlan`, "
                                    + "`controllerIp`, `SNMPUserNameTrap`, `SNMPAuthProtocolTrap`, `SNMPAuthPasswordTrap`, "
                                    + "`SNMPPrivProtocolTrap`, `SNMPPrivPasswordTrap`, `SNMPEngineID`, `SNMPUserNameRead`,"
                                    + " `SNMPAuthProtocolRead`, `SNMPPrivProtocolRead`, `SNMPUserNameWrite`, "
                                    + "`SNMPAuthProtocolWrite`, `SNMPAuthPasswordWrite`, `SNMPPrivProtocolWrite`, "
                                    + "`SNMPPrivPasswordWrite`, `SNMPVersionTrap`, `SNMPVersion`, `SNMPCommunityTrap`, "
                                    + "`SNMPCommunityRead`, `SNMPCommunityWrite`, `guestVlan`, `macDetectionVlan`) VALUES "
                                    + "('" + ip + "','"+ name + "','" + contact + "','"+ deviceLocation + "','"  + description 
                                    +"','Switch','" + mode + "','" + uplink + "','" + vlan + "','" 
                                    + normalvlan + "','" + rvlan + "','" + iso + "','" + cip + "','" + utrap + "','" 
                                    + snmpatrap + "','" + ptrap + "','" + snmpptrap + "','" + pptrap + "','" + eip + "','" 
                                    + uread + "','" + apread + "','" + ppread + "','" + pread + "','" + uw + "','" 
                                    + aw + "','" + authpw + "','" + pprow + "','" + ppasswrite + "','" + vt + "','" 
                                    + sv + "','" + ct + "','" + cr + "','" + cw + "','" + gv + "')";

                            Statement sqlStatement = DatabaseConnectivity.generateStatement();
                            ArrayListofVisibleItem.arrlist.add(ip);
                            sqlStatement.executeUpdate(sqlcreate);
                            sqlStatement.close();
                            Statement sqlStatement1 = DatabaseConnectivity.generateStatement();
                            sqlStatement1.executeUpdate(sql);
                            sqlStatement1.close();
                            dispose();


                        } else {
                            String sql;
                            sql = "INSERT INTO `packetfence_manuallyAddswitch_info`(`ip`,`name`,`contact`,`location`,`description`, `type`, `mode`, "
                                    + "`uplink`, `vlans`, `normalVlan`, `registrationVlan`, `isolationVlan`, "
                                    + "`controllerIp`, `SNMPUserNameTrap`, `SNMPAuthProtocolTrap`, `SNMPAuthPasswordTrap`, "
                                    + "`SNMPPrivProtocolTrap`, `SNMPPrivPasswordTrap`, `SNMPEngineID`, `SNMPUserNameRead`,"
                                    + " `SNMPAuthProtocolRead`, `SNMPPrivProtocolRead`, `SNMPUserNameWrite`, "
                                    + "`SNMPAuthProtocolWrite`, `SNMPAuthPasswordWrite`, `SNMPPrivProtocolWrite`, "
                                    + "`SNMPPrivPasswordWrite`, `SNMPVersionTrap`, `SNMPVersion`, `SNMPCommunityTrap`, "
                                    + "`SNMPCommunityRead`, `SNMPCommunityWrite`, `guestVlan`, `macDetectionVlan`) VALUES "
                                    + "('" + ip + "','"+ name + "','" + contact + "','"+ deviceLocation + "','"  + description 
                                    +"','Switch','" + mode + "','" + uplink + "','" + vlan + "','" 
                                    + normalvlan + "','" + rvlan + "','" + iso + "','" + cip + "','" + utrap + "','" 
                                    + snmpatrap + "','" + ptrap + "','" + snmpptrap + "','" + pptrap + "','" + eip + "','" 
                                    + uread + "','" + apread + "','" + ppread + "','" + pread + "','" + uw + "','" 
                                    + aw + "','" + authpw + "','" + pprow + "','" + ppasswrite + "','" + vt + "','" 
                                    + sv + "','" + ct + "','" + cr + "','" + cw + "','" + gv + "')";

                            //DatabaseConnectivity connectivity=new DatabaseConnectivity();

                            Statement sqlStatement = DatabaseConnectivity.generateStatement();
                            sqlStatement.executeUpdate(sql);
                            sqlStatement.close();
                            dispose();
                        }
                        ArrayListofVisibleItem.arrlist.add(ip);
                        // ArrayListofVisibleItem a1= new ArrayListofVisibleItem();
                        //            a1.add(jTextFieldIP.getText());


                        //Object parent = graph.getDefaultParent();
                        System.out.println("The id of inserted items is :" + "Switch_" + jTextFieldIP.getText());
                        graph.insertVertex(graph.getDefaultParent(), "Switch_" + jTextFieldIP.getText(), jTextFieldIP.getText(), dx, dy, 30, 30,
                                "image;image=/com/mxgraph/examples/swing/images/SwitchIcon.png");

                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }
            }
        });

        jButtonClear.setText("CLEAR");
        jButtonClear.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonClearActionPerformed(evt);
                jTextFieldMode.setText("");
                jTextFieldAuthoProtoWrite.setText("");
                jTextFieldAuthPassWrite.setText("");


                jTextFieldAuthPREAD.setText("");
                jTextFieldCommunityTRAP.setText("");
                jTextFieldComREAD.setText("");


                jTextFieldComunityWRITE.setText("");
                jTextFieldControllerIp.setText("");
                jTextFieldEngineId.setText("");


                jTextFieldGuestVLAN.setText("");
                // jTextFieldIP.setText("");
                jTextFieldIsolationVlan.setText("");

                jTextFieldNormalVLan.setText("");
                jTextFieldMacVLAN.setText("");
                jTextFieldPassTRAP.setText("");

                jTextFieldNormalVLan.setText("");
                jTextFieldUserWrite.setText("");
                jTextFieldRegistrationVlan.setText("");
                jTextFieldSNMPVersion.setText("");
                jTextFieldUserWrite.setText("");
                jTextFieldPassTRAP.setText("");
                jTextFieldPriPassTrap.setText("");
                jTextFieldPriPassWrite.setText("");
                jTextFieldPriProtoREAD.setText("");
                jTextFieldPrivatePREAD.setText("");
                jTextFieldPrivateProtoWrite.setText("");
                jTextFieldProtoTRAP.setText("");
                jTextFieldRegistrationVlan.setText("");
                jTextFieldSnmpauthProTRAP.setText("");
                jTextFieldSNMPVersion.setText("");
                // jTextFieldTYPE.setText("");
                jTextFieldUpLink.setText("");
                jTextFieldUserREAD.setText("");
                jTextFieldUserTrap.setText("");
                jTextFieldUserWrite.setText("");
                jTextFieldVersionTRAP.setText("");
                jTextFieldVLan.setText("");



            }
        });

        jButtonEXIT.setText("EXIT");
        jButtonEXIT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonEXITActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                .addComponent(jLabelIp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelType, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelRegistrationVlan, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
                .addComponent(jLabelIsolationVlan, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelVlan, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelUplink, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelMode, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelNormalVlan, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                .addComponent(jLabelSnmpversion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpprivatepassWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpprivprotWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpauthpassWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpauthprotocolWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpuserWrite, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpprivpassRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpprivprotRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpauthproRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpUserNameRead, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpEngineID, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpauthprivpasstrap, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpAuthPasswordTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 227, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jLabelControllerIp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpUsernameTrap, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSNMPPrivProtocolTraP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpAuthProtocolTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(jTextFieldIP, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jTextFieldPassTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUserTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldProtoTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPriPassTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 183, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldEngineId, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUserREAD, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldAuthPREAD, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPriProtoREAD, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPrivatePREAD, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUserWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldAuthoProtoWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldAuthPassWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addComponent(jTextFieldTYPE, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldMode, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUpLink, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldVLan, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldNormalVLan, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldRegistrationVlan, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldIsolationVlan, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldControllerIp, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldSnmpauthProTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addComponent(jTextFieldPrivateProtoWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPriPassWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                .addComponent(jLabelMacDetectionVLAN, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelGuestVLAN, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpCW, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpCR, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpCTrap, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabelSnmpversionTrap1, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addComponent(jButtonSubmit)
                .addGap(43, 43, 43)))
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                .addComponent(jTextFieldCommunityTRAP, javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(jTextFieldComREAD, javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(jTextFieldComunityWRITE, javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(jTextFieldGuestVLAN, javax.swing.GroupLayout.Alignment.TRAILING)
                .addComponent(jTextFieldMacVLAN, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)))
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButtonClear)
                .addGap(49, 49, 49)
                .addComponent(jButtonEXIT))
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(43, 43, 43)
                .addComponent(jTextFieldVersionTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, Short.MAX_VALUE))))
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jTextFieldSNMPVersion, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(30, 30, 30)))));

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[]{jTextFieldAuthPREAD, jTextFieldAuthPassWrite, jTextFieldAuthoProtoWrite, jTextFieldControllerIp, jTextFieldEngineId, jTextFieldIP, jTextFieldIsolationVlan, jTextFieldMode, jTextFieldNormalVLan, jTextFieldPassTRAP, jTextFieldPriPassWrite, jTextFieldPriProtoREAD, jTextFieldPrivatePREAD, jTextFieldPrivateProtoWrite, jTextFieldProtoTRAP, jTextFieldRegistrationVlan, jTextFieldSnmpauthProTRAP, jTextFieldTYPE, jTextFieldUpLink, jTextFieldUserREAD, jTextFieldUserTrap, jTextFieldUserWrite, jTextFieldVLan});

        jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelIp, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldIP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelType, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldTYPE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelMode, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldMode, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelUplink, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUpLink, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelVlan, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldVLan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelNormalVlan, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldNormalVLan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelRegistrationVlan, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldRegistrationVlan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelIsolationVlan, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldIsolationVlan, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelControllerIp, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldControllerIp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpAuthProtocolTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldSnmpauthProTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpUsernameTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUserTrap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpAuthPasswordTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPassTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSNMPPrivProtocolTraP, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldProtoTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpauthprivpasstrap, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPriPassTrap, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpEngineID, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldEngineId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpUserNameRead, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUserREAD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpauthproRead, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldAuthPREAD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpprivprotRead, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPriProtoREAD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpprivpassRead, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPrivatePREAD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpuserWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldUserWrite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpauthprotocolWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldAuthoProtoWrite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpauthpassWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldAuthPassWrite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpprivprotWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPrivateProtoWrite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpprivatepassWrite, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldPriPassWrite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpversionTrap1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldVersionTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpversion, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldSNMPVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpCTrap, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldCommunityTRAP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpCR, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldComREAD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelSnmpCW, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldComunityWRITE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelGuestVLAN, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldGuestVLAN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(12, 12, 12)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabelMacDetectionVLAN, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jTextFieldMacVLAN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jButtonSubmit)
                .addComponent(jButtonClear)
                .addComponent(jButtonEXIT))
                .addContainerGap()));

        jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[]{jTextFieldAuthPREAD, jTextFieldAuthPassWrite, jTextFieldAuthoProtoWrite, jTextFieldComREAD, jTextFieldCommunityTRAP, jTextFieldComunityWRITE, jTextFieldControllerIp, jTextFieldEngineId, jTextFieldGuestVLAN, jTextFieldIP, jTextFieldIsolationVlan, jTextFieldMacVLAN, jTextFieldMode, jTextFieldNormalVLan, jTextFieldPassTRAP, jTextFieldPriPassTrap, jTextFieldPriPassWrite, jTextFieldPriProtoREAD, jTextFieldPrivatePREAD, jTextFieldPrivateProtoWrite, jTextFieldProtoTRAP, jTextFieldRegistrationVlan, jTextFieldSNMPVersion, jTextFieldSnmpauthProTRAP, jTextFieldTYPE, jTextFieldUpLink, jTextFieldUserREAD, jTextFieldUserTrap, jTextFieldUserWrite, jTextFieldVLan, jTextFieldVersionTRAP});

        jScrollPane1.setViewportView(jPanel1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 508, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE)));
        layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 550, Short.MAX_VALUE)));

        pack();
    }// </editor-fold>                        

    private void jButtonClearActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    private void jTextFieldIPActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    private void jTextFieldModeActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    private void jTextFieldUpLinkActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    private void jTextFieldSnmpauthProTRAPActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }

    private void jButtonEXITActionPerformed(java.awt.event.ActionEvent evt) {
        dispose();        // TODO add your handling code here:
    }

    private void jTextFieldComunityWRITEActionPerformed(java.awt.event.ActionEvent evt) {
        // TODO add your handling code here:
    }
    /**
     * @param args the command line arguments
     */
    // Variables declaration - do not modify                     
    private javax.swing.JButton jButtonClear;
    private javax.swing.JButton jButtonEXIT;
    private javax.swing.JButton jButtonSubmit;
    private javax.swing.JLabel jLabelControllerIp;
    private javax.swing.JLabel jLabelGuestVLAN;
    private javax.swing.JLabel jLabelIp;
    private javax.swing.JLabel jLabelIsolationVlan;
    private javax.swing.JLabel jLabelMacDetectionVLAN;
    private javax.swing.JLabel jLabelMode;
    private javax.swing.JLabel jLabelNormalVlan;
    private javax.swing.JLabel jLabelRegistrationVlan;
    private javax.swing.JLabel jLabelSNMPPrivProtocolTraP;
    private javax.swing.JLabel jLabelSnmpAuthPasswordTrap;
    private javax.swing.JLabel jLabelSnmpAuthProtocolTrap;
    private javax.swing.JLabel jLabelSnmpCR;
    private javax.swing.JLabel jLabelSnmpCTrap;
    private javax.swing.JLabel jLabelSnmpCW;
    private javax.swing.JLabel jLabelSnmpEngineID;
    private javax.swing.JLabel jLabelSnmpUserNameRead;
    private javax.swing.JLabel jLabelSnmpUsernameTrap;
    private javax.swing.JLabel jLabelSnmpauthpassWrite;
    private javax.swing.JLabel jLabelSnmpauthprivpasstrap;
    private javax.swing.JLabel jLabelSnmpauthproRead;
    private javax.swing.JLabel jLabelSnmpauthprotocolWrite;
    private javax.swing.JLabel jLabelSnmpprivatepassWrite;
    private javax.swing.JLabel jLabelSnmpprivpassRead;
    private javax.swing.JLabel jLabelSnmpprivprotRead;
    private javax.swing.JLabel jLabelSnmpprivprotWrite;
    private javax.swing.JLabel jLabelSnmpuserWrite;
    private javax.swing.JLabel jLabelSnmpversion;
    private javax.swing.JLabel jLabelSnmpversionTrap1;
    private javax.swing.JLabel jLabelType;
    private javax.swing.JLabel jLabelUplink;
    private javax.swing.JLabel jLabelVlan;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextField jTextFieldAuthPREAD;
    private javax.swing.JTextField jTextFieldAuthPassWrite;
    private javax.swing.JTextField jTextFieldAuthoProtoWrite;
    private javax.swing.JTextField jTextFieldComREAD;
    private javax.swing.JTextField jTextFieldCommunityTRAP;
    private javax.swing.JTextField jTextFieldComunityWRITE;
    private javax.swing.JTextField jTextFieldControllerIp;
    private javax.swing.JTextField jTextFieldEngineId;
    private javax.swing.JTextField jTextFieldGuestVLAN;
    private javax.swing.JTextField jTextFieldIP;
    private javax.swing.JTextField jTextFieldIsolationVlan;
    private javax.swing.JTextField jTextFieldMacVLAN;
    private javax.swing.JTextField jTextFieldMode;
    private javax.swing.JTextField jTextFieldNormalVLan;
    private javax.swing.JTextField jTextFieldPassTRAP;
    private javax.swing.JTextField jTextFieldPriPassTrap;
    private javax.swing.JTextField jTextFieldPriPassWrite;
    private javax.swing.JTextField jTextFieldPriProtoREAD;
    private javax.swing.JTextField jTextFieldPrivatePREAD;
    private javax.swing.JTextField jTextFieldPrivateProtoWrite;
    private javax.swing.JTextField jTextFieldProtoTRAP;
    private javax.swing.JTextField jTextFieldRegistrationVlan;
    private javax.swing.JTextField jTextFieldSNMPVersion;
    private javax.swing.JTextField jTextFieldSnmpauthProTRAP;
    private javax.swing.JTextField jTextFieldTYPE;
    private javax.swing.JTextField jTextFieldUpLink;
    private javax.swing.JTextField jTextFieldUserREAD;
    private javax.swing.JTextField jTextFieldUserTrap;
    private javax.swing.JTextField jTextFieldUserWrite;
    private javax.swing.JTextField jTextFieldVLan;
    private javax.swing.JTextField jTextFieldVersionTRAP;
    // End of variables declaration                   
}